package com.nervenets.web.hibernate.dao;

import com.nervenets.web.hibernate.domain.AccountOpen;
import com.nervenets.web.hibernate.domain.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

@Repository
public interface AccountOpenDao extends JpaRepository<AccountOpen, Long>, JpaSpecificationExecutor<AccountOpen> {
    AccountOpen findTop1ByUser(User user);

    AccountOpen findTop1ByUserOrderByIdDesc(User user);
}
